Skip to content

SEP-1046: Client credentials flow for M2M without user interaction#1157

Merged
pcarleton merged 21 commits into
modelcontextprotocol:mainfrom
KKonstantinov:feature/sep-1046-client-credentials
Nov 28, 2025
Merged

SEP-1046: Client credentials flow for M2M without user interaction#1157
pcarleton merged 21 commits into
modelcontextprotocol:mainfrom
KKonstantinov:feature/sep-1046-client-credentials

Conversation

@KKonstantinov

Copy link
Copy Markdown
Contributor

Draft PR: Implements SEP-1046 (modelcontextprotocol/ext-auth#3, https://github.com/modelcontextprotocol/ext-auth/blob/main/specification/draft/oauth-client-credentials.mdx).

Motivation and Context

The Client Credentials flow enables machine-to-machine authentication without user interaction. This flow requires pre-registered client credentials, which are typically established out-of-band through administrative channels. Dynamic Client Registration is not used in this flow.

How Has This Been Tested?

Unit tests added.

Breaking Changes

Additional methods added on

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@pkg-pr-new

pkg-pr-new Bot commented Nov 22, 2025

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/sdk@1157

commit: 82ca0af

@KKonstantinov

KKonstantinov commented Nov 22, 2025

Copy link
Copy Markdown
Contributor Author

Subject to review cycle and any changes requested applied, leaving some notes:

  • README additions need to be added
  • Special note for README: Node v18 requires a polyfill for the jose dependency, as older node versions do not have .crypto in globalThis.

@KKonstantinov KKonstantinov marked this pull request as ready for review November 26, 2025 05:16
@KKonstantinov KKonstantinov requested review from a team as code owners November 26, 2025 05:16
@KKonstantinov KKonstantinov changed the title Draft: SEP-1046: Client credentials flow for M2M without user interaction SEP-1046: Client credentials flow for M2M without user interaction Nov 26, 2025
//case "client_credentials":

// Additional auth methods will not be added on the server side of the SDK.
case 'client_credentials':

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just forward it to the upstream provider?

@pcarleton pcarleton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, this LGTM

@pcarleton pcarleton merged commit 4fb4d4d into modelcontextprotocol:main Nov 28, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement SEP-1046: Support OAuth client credentials flow in authorization

3 participants